﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YLServiceCLient.YLAdminClient;
using YLPublicService.TransferModel;

namespace YLServerInterface.FunctionalClass
{
    public class Caches
    {
        static AdminServiceClient client = AdminServiceClient.GetServiceClient();
        public Caches()
        {

        }
        private static List<TemplateItem> templateItems;
        public static List<TemplateItem> TemplateItems
        {
            get
            {
                if (templateItems == null)
                {
                    templateItems = client.GetEnableTemplates().ToList();
                }
                return templateItems;
            }
        }
        public static void RefleshTemplateItems()
        {
            templateItems = null;
        }
    }
}
